/**
*created by xuqiang 19/05/08
*/
const  routes = [
    {
        path:'/', //默认路由
        name:'portal-web',
        meta:{
            title:"portal-web"
        },
        component:resolve => {require(['@/views/portal/portal-web.vue'],resolve)},
    },
    {
        path:'/t1',
        name:'t1',
        meta:{
            title:"t1"
        },
        component:resolve => {require(['@/views/t/t1.vue'],resolve)},
    },
    {
        path:'/t2',
        name:'t2',
        meta:{
            title:"t2"
        },
        component:resolve => {require(['@/views/t/t2.vue'],resolve)},
    },
    {
        path:'/t3',
        name:'t3',
        meta:{
            title:"t3"
        },
        component:resolve => {require(['@/views/t/t3.vue'],resolve)},
    },
    {
        path:'/portal-web',
        name:'portal-web',
        meta:{
            title:"portal-web"
        },
        component:resolve => {require(['@/views/portal/portal-web.vue'],resolve)},
        children:[
            {
                path:'/portal-web/home',
                name:'home',
                meta:{
                    title:"首页"
                },
                component:resolve => {require(['@/views/portal/component/home/home.vue'],resolve)},
            },
            {
                path:'/portal-web/home/homeProvince',
                name:'homeProvince',
                meta:{
                    title:"省份"
                },
                component:resolve => {require(['@/views/portal/component/home/homeProvince.vue'],resolve)},
            },
            {
                path:'/portal-web/home/homeCity',
                name:'homeCity',
                meta:{
                    title:"城市"
                },
                component:resolve => {require(['@/views/portal/component/home/homeCity.vue'],resolve)},
            },
            {
                path:'/portal-web/home/fengxianyinhuan',
                name:'fengxianyinhuan',
                meta:{
                    title:"风险隐患"
                },
                component:resolve => {require(['@/views/portal/component/home/fengxianyinhuan.vue'],resolve)},
            },
            {
                path:'/portal-web/home/tufashijian',
                name:'tufashijian',
                meta:{
                    title:"突发事件"
                },
                component:resolve => {require(['@/views/portal/component/home/tufashijian.vue'],resolve)},
            },
            {
                path:'/portal-web/home/jianceyujing',
                name:'jianceyujing',
                meta:{
                    title:"监测预警"
                },
                component:resolve => {require(['@/views/portal/component/home/jianceyujing.vue'],resolve)},
            },
            {
                path:'/portal-web/home/shigonganquan',
                name:'shigonganquan',
                meta:{
                    title:"施工安全"
                },
                component:resolve => {require(['@/views/portal/component/home/shigonganquan.vue'],resolve)},
            },
            {
                path:'/portal-web/sourceControl',
                name:'sourceControl',
                meta:{
                    title:"源头控制"
                },
                component:resolve => {require(['@/views/portal/component/sourceControl/sourceControl.vue'],resolve)},
            },
            {
                path:'/portal-web/processMonitoring',
                name:'processMonitoring',
                meta:{
                    title:"过程监控"
                },
                component:resolve => {require(['@/views/portal/component/processMonitoring/processMonitoring.vue'],resolve)},
            },
            {
                path:'/portal-web/earlyWarning',
                name:'earlyWarning',
                meta:{
                    title:"过程监控"
                },
                component:resolve => {require(['@/views/portal/component/earlyWarning/earlyWarning.vue'],resolve)},
            },
            {
                path:'/portal-web/emergencyResponse',
                name:'emergencyResponse',
                meta:{
                    title:"应急处置"
                },
                component:resolve => {require(['@/views/portal/component/emergencyResponse/emergencyResponse.vue'],resolve)},
            },
            {
                path:'/portal-web/composite',
                name:'composite',
                meta:{
                    title:"综合治理"
                },
                component:resolve => {require(['@/views/portal/component/composite/composite.vue'],resolve)},
            },
        ],
    },
    {
        path: '/401',
        name: 'error_401',
        meta:{
            title:"error_401",
        },
        component: (resolve) => {require(['@/views/error_page/401.vue'],resolve)}
    },
    {
        path: '/500',
        name: 'error_500',
        meta:{
            title:"error_500",
        },
        component: (resolve) =>{require(['@/views/error_page/500.vue'],resolve)}
    },
    {
        path:'*',
        name:'404',
        meta:{
            title:"404",
        },
        component:resolve => {require(['@/views/error_page/404.vue'],resolve)}
    },
];
export default routes;